package com.zly.framework.rbac.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zly.framework.rbac.model.entity.RolePermission;
import com.zly.framework.rbac.mapper.RolePermissionMapper;
import com.zly.framework.rbac.service.RolePermissionService;
import org.springframework.stereotype.Service;

@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission> implements RolePermissionService {

    /**
     * 删除rolePermission by roleId
     *
     * @param roleId roleId
     */
    @Override
    public void removeByRoleId(Long roleId) {
        this.baseMapper.delete(new LambdaQueryWrapper<RolePermission>().eq(RolePermission::getRoleId, roleId));
    }
}
